<template>
  <div class="dashboard">
    <div>
      <component :is="myEcharts" />
    </div>
  </div>
</template>

<script>
import DashboardAdmin from './echarts'
// import nation from './nation/index'
// import local from './local/index'
export default {
  name: 'Dashboard',
  components: {
    DashboardAdmin
  },
  data() {
    return {
      myEcharts: DashboardAdmin,
      // iframeSrc: `${process.env.BASE_API}static/map/nation.html`
      iframeSrc1: `static/map/nation.html`,
      iframeSrc2: `static/map/local.html`,
      indexType: ''
    }
  },
  created() {
    let user = JSON.parse(window.sessionStorage.getItem('user'))
    this.indexType = user.userType
  }
}
</script>
<style rel="stylesheet/scss" lang="scss">
.dashboard {
  height: 100%;

  & > div {
    height: 100%;
  }

  iframe {
    border: 0;
    width: 100%;
    height: 100%;
  }
}
</style>
